/**
 * 
 */
package com.gopay.common.constants.bank;


/**
 * @CmbQueryRespone.java
 * @author Ryan
 * @2013-11-20 上午9:48:26  www.gopay.com.cn Inc.All rights reserved.
 */
public enum CmbQueryRespone {

    CMB_ORDER_STATUS_SUCCESS("0","已结帐"),
    CMB_ORDER_STATUS_UNDONE("1","已撤销"),
    CMB_ORDER_STATUS_PART_SUCCESS("2","部分结帐"),
    CMB_ORDER_STATUS_REFUND("3","退款"),
    CMB_ORDER_STATUS_UNSETTLED("4","未结帐"),
    CMB_ORDER_STATUS_INVALID("5","无效状态"),
    CMB_ORDER_STATUS_UNKNOWN("6","未知状态");
    
    private String key;
    public String value;

    CmbQueryRespone(String key, String value) {
        this.key = key;
        this.value = value;
    }

    // 普通方法
    public static String getName(String key) {
        for (CmbQueryRespone info : CmbQueryRespone.values()) {
            if (info.getKey().equals(key)) {
                return info.value;
            }
        }
        return "";
    }

    /**
     * @return the key
     */
    public String getKey() {
        return key;
    }

    /**
     * @param key the key to set
     */
    public void setKey(String key) {
        this.key = key;
    }

    /**
     * @return the value
     */
    public String getValue() {
       return this.value;
    }

}
